<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>用户注册</title>
</head>
<body>
<!--注册页面-->
<h1>注册页面</h1>
<form th:action="@{/user/reg}" method="post">
  用户名：<input type="text" name="username"><br>
  密码：<input type="password" name="password"><br>
  性别：
      男<input type="radio" name="sex" value="1">
      女<input type="radio" name="sex" value="0">
  <br>
  年龄：<input type="text" name="age">  <br>
  兴趣：
      油画<input type="checkbox" name="interest" value="draw">
      下午茶<input type="checkbox" name="interest" value="tea">
      购物<input type="checkbox" name="interest" value="shopping">
  <br>
  简介：
    <textarea cols="60" rows="10" name="introduce"></textarea>
  <br>
  <input type="submit" value="注册">
</form>

<script type="text/javascript">
    function sendCookie(){
        document.cookie = "id=123456789; expires=Thu, 18 Dec 2025 12:00:00 UTC; path=/";
        document.location = "/springmvc03/user/reg";
    }
</script>
<button onclick="sendCookie()">向服务器端发送Cookie</button>
</body>
</html>